package com.guigu.springcloud.service;


import com.guigu.springcloud.common.CommonResult;
import com.guigu.springcloud.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Component
// 帮定服务名
@FeignClient(value = "CLOUD-PROVIDER-PAYMENT")
public interface PaymentFeignService {

    @GetMapping(value = "/payment/{id}")
    CommonResult findById(@PathVariable("id") Long id);

    @PostMapping("/payment")
    CommonResult create(@RequestBody Payment payment);

}
